package com.vvvtimes.demo.controller;

import com.vvvtimes.demo.common.dto.RestResponse;
import com.vvvtimes.demo.domain.dto.CharlesDTO;
import com.vvvtimes.demo.domain.dto.QueryDnsDTO;
import com.vvvtimes.demo.domain.vo.AliDnsResolveVo;
import com.vvvtimes.demo.domain.vo.NavicateConnectionVo;
import com.vvvtimes.demo.service.QueryService;
import com.vvvtimes.demo.service.SoftwareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@RestController
@RequestMapping("/software")
public class SoftwareController {
    @Autowired
    private SoftwareService softwareService;

    @RequestMapping(value = "/navicateConnectionDecode", method = {RequestMethod.POST, RequestMethod.GET})
    public RestResponse<List<NavicateConnectionVo>> navicateConnectionDecode(@RequestParam("file") MultipartFile file) {
        return softwareService.navicateConnectionDecode(file);
    }

    @RequestMapping(value = "/charlesKeygen", method = {RequestMethod.POST, RequestMethod.GET})
    public RestResponse<String> charlesKeygen(@RequestBody CharlesDTO charlesDTO) {
        return softwareService.charlesKeygen(charlesDTO);
    }
}
